﻿#region 版权信息

// ------------------------------------------------------------------------------
// Copyright: (c) 2019  梅军章
// 项目名称：Amm.UnitOfWork
// 文件名称：IRepositoryFactory.cs
// 版本号: V1.0.0.0
// 创建时间：2019-07-31 9:30
// 更改时间：2019-07-31 9:45
// ------------------------------------------------------------------------------

#endregion

namespace Amm.UnitOfWork
{
    /// <summary>
    ///     Defines the interfaces for <see cref="IRepository{TEntity}" /> interfaces.
    /// </summary>
    public interface IRepositoryFactory
    {
        /// <summary>
        ///     Gets the specified repository for the <typeparamref name="TEntity" />.
        /// </summary>
        /// <param name="hasCustomRepository"><c>True</c> if providing custom repositry</param>
        /// <typeparam name="TEntity">The type of the entity.</typeparam>
        /// <returns>An instance of type inherited from <see cref="IRepository{TEntity}" /> interface.</returns>
        IRepository<TEntity> GetRepository<TEntity>(bool hasCustomRepository = false) where TEntity : class;
    }
}